﻿using AppSocketModel;
using BCGPSCommon;
using System.Collections.Generic;

namespace AppSocketService.Vehicle
{
    public interface IVehiclePersonService
    {
        /// <summary>
        /// 初始化 Redis 
        /// </summary>
        /// <returns></returns>
        List<VehicleDto> InitRedisGetListAll();

         

        /// <summary>
        /// 添加新GPS设备
        /// </summary>
        /// <param name="vehicleRequestDto"></param>
        /// <returns></returns>
        VehicleDto AddNew(VehicleRequestDto vehicleRequestDto);

        /// <summary>
        /// 删除设备
        /// </summary>
        /// <param name="imei"></param>
        /// <returns></returns>
        void Delete( string imei);

        /// <summary>
        /// 删除全部
        /// </summary>
        void DeleteAll();


        /// <summary>
        /// 修改车辆信息  根据 vehicleNo 
        /// </summary>
        /// <param name="vehicleDto"></param>
        /// <returns></returns>
        VehicleDto Update(VehicleDto vehicleDto);
         

        /// <summary>
        /// 获取登录账户下的车辆列表
        /// </summary>
        /// <returns></returns>
        List<VehicleDto> GetVehicleList();

        /// <summary>
        /// 获取车辆信息通过IMEI
        /// </summary>
        /// <param name="imei"></param>
        /// <returns></returns>
        VehicleDto GetVehicleByImei(string imei);

        /// <summary>
        /// 通过车牌号获取车辆信息
        /// </summary>
        /// <param name="vehicleNo"></param>
        /// <returns></returns>
        List<VehicleDto> GetVehicleListByVehicleNo(string vehicleNo);

        /// <summary>
        /// 获取指定车辆信息和定位信息
        /// </summary>
        /// <param name="imei"></param>
        /// <param name="gpsMapType"></param>
        /// <returns></returns>
        VehicleLocationDto GetVehicleLocation(string imei, GpsMapType gpsMapType);

        /// <summary>
        /// 获取当前账户下全部车辆信息和定位信息
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="gpsMapType"></param>
        List<VehicleLocationDto> GetVehicleLocationList(GpsMapType gpsMapType);

        /// <summary>
        /// 获取指定账户的车辆列表
        /// </summary>
        /// <param name="accountCode"></param>
        /// <param name="desc"></param>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        PageableList<VehicleDto> SysGetVehicleList(string accountCode, bool desc, int index, int size);
    }
}